package com.snail.billing;

import java.util.HashSet;
import java.util.Set;

public class BillingBroadcast {

	public static final String ACTION_BIND_MOBILE_SUCCEED = "action.bind.mobile.succeed";
	public static final String ACTION_BIND_EMAIL_SUCCEED = "action.bind.email.succeed";
	public static final String ACTION_BIND_ACCOUNT_SUCCEED = "action.bind.account.succeed";

	protected static BillingBroadcast instance;

	private Set<String> set;
	private BillingBroadcastResult result;

	public static final BillingBroadcast newInstance() {
		instance = new BillingBroadcast();
		return instance;
	}

	protected BillingBroadcast() {
		set = new HashSet<String>();
	}

	public boolean contains(String action) {
		return set.contains(action);
	}

	public void addAction(String action) {
		set.add(action);
	}

	public void setResult(BillingBroadcastResult result) {
		this.result = result;
	}

	public BillingBroadcastResult getResult() {
		return result;
	}

}
